//
//  IManager+ModuleShopManageDetail.m
//  RocketProject
//
//  Created by Wu Chengwei on 13-10-2.
//  Copyright (c) 2013年 Rocket. All rights reserved.
//

#import "IManager+ModuleShopManageDetail.h"
#import "FrameworkRelativeDefines.h"
#import "RCShopManagerDataModel.h"
#import "NetUrlDefines.h"
#import "RequestUtlity.h"
#import "GloableEngineService.h"
#import "NSString+NSString_Ex_.h"

@implementation IManager(ModuleShopManageDetail)

-(int64_t)requestShopManageDetailInfo:(id<IManagerDelegate>)delegate{
    NSString *shopID = [GloableEngineService sharedInstance].shopID;
    NSString *shopBduss = [GloableEngineService sharedInstance].shopBduss;
    
    if ([NSString stringIsNullOrEmpty:shopID] || [NSString stringIsNullOrEmpty:shopBduss]) {
        return kInvalidRequestId;
    }
    NSString *urlSuffix = [NSString stringWithFormat:kRCShopManagerDetailPrefix,shopBduss,shopID];
    
    NSString *url = [RequestUtlity getFormattedUrl:urlSuffix];
    
    KFLog(@"request url %@",url);
    return [[IDataProvider sharedInstance] asyncFetchDataWithUserInfo:url
                                                             userInfo:nil
                                                      withCachePolicy:IDataCachePolicyLocalFileAndNetwork
                                                   withDataParseClass:[RCShopManagerDataModel class]
                                                     withDataDelegate:delegate];
    
}

@end
